//
//  NSString+MD5.h
//  lib51PKUserCenter
//
//  Created by L.T.ZERO on 14-4-24.
//  Copyright (c) 2014年 51pk. All rights reserved.
//

#import <Foundation/Foundation.h>

#define RegularCommonName @"^[a-zA-Z\u4e00-\u9fa5]+$"
#define RegularCommonNumber @"^[0-9]*$"
#define RegularCommonHttp @"/^http(s?):\/\/(?:[A-za-z0-9-]+\.)+[A-za-z]{2,4}(:\d+)?(?:[\/\?#][\/=\?%\-&~`@[\]\\':+!\.#\w]*)?/"

@interface NSString(Secret)

- (NSString *)MD5String;
- (NSString *)hmacsha1WithKey:(NSString *)secret;

/*加密规则*/
- (NSString*)base64RC4;
- (NSString*)base64RC4WithKey:(char*)Key;

+(NSString*)decrypt:(NSData*)data key:(char*)Key;
+(Byte*)decryptByte:(Byte*)bytes key:(char*)Key len:(int)len;

- (BOOL)regexWithRegular:(NSString *)regular;

@end
